/**
 * @author:李雄
 * @ClassName:MyTest
 * @Description:内部类测试
 * @createTime:2022-08-14 15:48
 */
public class MyTest {
    public static void main(String[] args) {
        //成员内部类测试
//        MemberInnerClass memberInnerClass = new MemberInnerClass();
//        memberInnerClass.name = "李雄";
//        System.out.println(memberInnerClass.name);
//        MemberInnerClass.InnerClass innerClass = memberInnerClass.new InnerClass("加油","爱拼才会赢");
//        System.out.println(memberInnerClass.name+innerClass.name);

        //实例化方法1
        StaticInnerClass staticInnerClass = new StaticInnerClass();
        staticInnerClass.name="李雄";
        StaticInnerClass.InnerClass innerClass = new StaticInnerClass.InnerClass();
        innerClass.name="李雄";
        innerClass.age="23";
        innerClass.show();
        System.out.println(innerClass.name+innerClass.age);

    }
}
